home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Utilities Professional 1-1500
/
Utilities Professional 1-1500 (1994)(WPD)[!].iso
/
12511500
/
var1308.dms
/
var1308.adf
/
DNET2_10.LHA
/
DNet
/
Amiga
/
Sourcen.lha
/
lib
/
dstat.c
< prev
next >
Wrap
C/C++ Source or Header
|
1993-01-14
|
577b
|
35 lines
/*
* DStat.C
*/
#include "lib.h"
int
DStat(host, buffer, max)
char *host;
APTR buffer;
long max;
{
IOSTD ior;
char buf[sizeof(DNETPORTNAME)+32];
PORT *replyport = CreatePort(NULL, 0);
PORT *dnetport;
if (!host)
host = "0";
sprintf(buf, "%s%s", DNETPORTNAME, host);
if (dnetport = FindPort(buf)) {
ior.io_Command = DNCMD_INFO;
ior.io_Unit = 0;
ior.io_Offset = 0;
ior.io_Data = buffer;
ior.io_Message.mn_ReplyPort = replyport;
PutMsg(dnetport, (MSG *)&ior);
WaitMsg(&ior);
DeletePort(replyport);
}
return(dnetport != NULL);
}